<?php
/**
@Project: 
@Page: 
@Path: 
@Notes: 
**/
class SHML_Content
{

	public function content_section($properties)
	{
		$p = explode("/",$_SERVER['PHP_SELF']);
		$page = array_pop($p);
		$p = implode("/",$p) . "/";
		return $p;
	}
	
	public function content_url($properties)
	{
		$v = strtolower($properties['attributes']['value']);
		$s = (strtolower($properties['attributes']['secure']) == "true") ? "s" : "";
		$p = "";
		
		switch ($v) {
			case "full":
			$p = $_SERVER['REQUEST_URI'];
			break;
			
			case "section":
			$p = $this->content_section(1);
			break;
			
			case "current":
			$p = $_SERVER['PHP_SELF'];
			break;
		}
		
		return "http" . $s . "://" . $_SERVER['HTTP_HOST'] . $p;
	}
	
}